package com.Eastiy.EXO.View;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.widget.LinearLayout;
import com.Eastiy.EXO.View.NewSwitch;

public class SwitchBut {
    private static Context context;

    public SwitchBut(Context context2, LinearLayout linearLayout, boolean z, String str, String str2, NewSwitch.OnSwitchStateChangeListener onSwitchStateChangeListener) {
        context = context2;
        NewView newView = new NewView(context, new Integer((int) (((double) m41W()) * 0.45d)), new Integer((int) (((double) m40H()) * 0.13d)), "LC", new Integer(0), 1, "#383838", new Integer(20), (View.OnClickListener) null);
        newView.setElevation((float) 8);
        NewView newView2 = new NewView(context, new Integer((int) (((double) m41W()) * 0.02d)), new Integer((int) (((double) m40H()) * 0.13d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewView newView3 = new NewView(context, new Integer((int) (((double) m41W()) * 0.08d)), new Integer((int) (((double) m40H()) * 0.13d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewText newText = new NewText(context, ASUI.FontColor(new StringBuffer().append("§l").append(str).toString()), "CC", 13, "#00FF00");
        NewView newView4 = new NewView(context, new Integer((int) (((double) m41W()) * 0.08d)), new Integer((int) (((double) m40H()) * 0.13d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewView newView5 = new NewView(context, new Integer((int) (((double) m41W()) * 0.1d)), new Integer((int) (((double) m40H()) * 0.13d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewText newText2 = new NewText(context, ASUI.FontColor(new StringBuffer().append("§l").append(str2).toString()), "CC", 10, "#00FF00");
        NewView newView6 = new NewView(context, new Integer((int) (((double) m41W()) * 0.06d)), new Integer((int) (((double) m40H()) * 0.13d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewView newView7 = new NewView(context, new Integer((int) (((double) m41W()) * 0.08d)), new Integer((int) (((double) m40H()) * 0.13d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewSwitch newSwitch = new NewSwitch(context2);
        newSwitch.setOn(z);
        newSwitch.setOnSwitchStateChangeListener(onSwitchStateChangeListener);
        newSwitch.setbackgroundColor(Color.parseColor("#000000"));
        newSwitch.setcolorStep(Color.parseColor("#383838"));
        newView7.setElevation((float) 8);
        NewView newView8 = new NewView(context, new Integer((int) (((double) m41W()) * 0.45d)), new Integer((int) (((double) m40H()) * 0.02d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        linearLayout.addView(newView);
        newView.addView(newView2);
        newView.addView(newView3);
        newView3.addView(newText);
        newView.addView(newView4);
        newView.addView(newView5);
        newView5.addView(newText2);
        newView.addView(newView6);
        newView.addView(newView7);
        newView7.addView(newSwitch);
        linearLayout.addView(newView8);
    }

    /* renamed from: H */
    private static int m40H() {
        return context.getResources().getDisplayMetrics().heightPixels;
    }

    /* renamed from: W */
    private static int m41W() {
        return context.getResources().getDisplayMetrics().widthPixels;
    }
}
